Fix PostgreSQL test errors: union operations and JSON field access#590
Fix PostgreSQL test errors: union operations and JSON field access#590Copilot wants to merge 6 commits into
Conversation
Co-authored-by: FCO <99834+FCO@users.noreply.github.com>
- Remove outdated skip for MINUS operations in t/14-union.rakutest (PostgreSQL already supports EXCEPT)
- Fix JSON field access by using proper PostgreSQL JSONB path syntax: #{key} instead of #'key'
- Fix JSON parameter binding by using native data structures instead of stringified JSON
- Change PostgreSQL driver to stringify-json = False for proper JSONB handling
Co-authored-by: FCO <99834+FCO@users.noreply.github.com>
Co-authored-by: FCO <99834+FCO@users.noreply.github.com>
|
@copilot the tests are still failing |
Co-authored-by: FCO <99834+FCO@users.noreply.github.com>
Fixed the PostgreSQL JSONB path syntax error. The issue was that I wasn't properly escaping the closing brace in the path generation, which was causing malformed SQL like Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Code Review —
|
| Metric | Value |
|---|---|
| Files changed | 4 |
| Lines added | +7 |
| Lines removed | −6 |
| Security scan | Clean |
Reviewed by Hermes Agent
Code Review — Fix PostgreSQL test errors: union operations and JSON field accessVerdict: Approve (0 critical, 0 warnings, 1 suggestion) Small, focused fix (+7/−6, 4 files) addressing real PostgreSQL driver issues: JSON serialization, path syntax, and the MINUS operator test. ✅ Looks Good
💡 Suggestions
📊 Stats
Reviewed by Hermes Agent |
Code Review — Fix PostgreSQL test errors: union operations and JSON field accessVerdict: Approve (0 critical, 0 warnings, 2 suggestions) Small, focused PR (4 files, +7 −6) fixing three real bugs in PostgreSQL JSON handling and a test guard that broke PG test runs. All changes are correct and well-targeted. ✅ Looks Good
💡 Suggestions
📊 Stats
Reviewed by Hermes Agent |
This PR fixes several PostgreSQL-related test failures that were preventing proper testing and usage of Red ORM with PostgreSQL databases.
Issues Fixed
1. Union/Minus Operations (t/14-union.rakutest)
2. JSON Field Access (t/37-json.rakutest)
stringify-json = Falsefor proper JSONB handling'{key}'instead of incomplete'{key':!pretty)Technical Changes
'\{$path\}'syntax to generate proper'{key}'pathsstringify-jsonfromTruetoFalsefor native JSONB storageTesting Status
The latest fix addresses a syntax error where the closing brace wasn't properly escaped in the JSONB path generation, which would have caused malformed SQL queries.
Fixes #589.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.